package test.abc.spring.app1.hello;

import org.apache.log4j.BasicConfigurator;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.core.io.FileSystemResource;

/**
 * @author husong 2012-10-19 上午11:09:52
 */
public class Hello {

    private Logger logger = Logger.getLogger(Hello.class);

    /**
     * @param args
     */
    public static void main(String[] args) throws Exception {
        BasicConfigurator.configure();
        BeanFactory factory = new XmlBeanFactory(
                                                 new FileSystemResource(
                                                                        "src/main/java/test/abc/spring/app1/hello/Hello.xml"));
        GreetingService greetingService = (GreetingService) factory.getBean("greetingService");
        greetingService.sayGreeting();
    }

}
